
#@layout()
#define css()

#@layout_css?()
<link rel="stylesheet" href="#(CPATH)/static/components/datepicker/css/bootstrap-datepicker3.min.css">
#end
#define script()
<script src="#(CPATH)/static/components/ckeditor/ckeditor.js"></script>
<script src="#(CPATH)/static/components/editable/js/bootstrap-editable.min.js"></script>
#@layout_script?()
<script src="#(CPATH)/static/components/datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="#(CPATH)/static/components/datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script>
    $("input[hint='date']").datepicker({
        format: 'yyyy-mm-dd',
        language: 'zh-CN'
    });

  function doSubmit() {
    ajaxSubmit("#form", function (data) {
        $("#entryId").attr("value", data.id);
        toastr.success('内容保存成功。');
    })
  }

    $("#submit").on("click", function () {
        doSubmit();
    })

    initEditor('editor1', 467, "html");
    </script>
#end


#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
                        编辑/新增
            <small>Edit</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <form class="form-horizontal form-setting" autocomplete="off"
                          action="/admin/recruit/jpress_addon_recruit/doSave"
                          method="POST" id="form">

                        <div class="box-body ">
	                                <input type="hidden" id="entryId" name="jpressAddonRecruit.id" value="#(jpressAddonRecruit.id ??)">
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label">招聘电话</label>
		                                <div class="col-sm-6">

										   <input type="input" name="jpressAddonRecruit.recruitphone" class="form-control" value="#(jpressAddonRecruit.recruitphone ??)"
		                                           placeholder="">
		                                </div>
		                            </div>
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label">招聘地址</label>
		                                <div class="col-sm-6">

										   <input type="input" name="jpressAddonRecruit.recruitaddress" class="form-control" value="#(jpressAddonRecruit.recruitaddress ??)"
		                                           placeholder="">
		                                </div>
		                            </div>
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label">招聘邮箱</label>
		                                <div class="col-sm-6">

										   <input type="input" name="jpressAddonRecruit.recruitemail" class="form-control" value="#(jpressAddonRecruit.recruitemail ??)"
		                                           placeholder="">
		                                </div>
		                            </div>
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label">招聘详情</label>

                                        <div class="col-sm-9">
                                            <textarea id="editor1" name="jpressAddonRecruit.recruitdetails"
                                          style="height: 467px;width: 100%;background-color: white">#EditorContent(jpressAddonRecruit.recruitdetails ??)</textarea>
                                        </div>

		                            </div>

                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="col-sm-offset-2 col-sm-10 submit-block">
                                <div class="box-submit">
                                    <button id="submit" type="button" class="btn btn-primary">提交</button>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>

</div>
#end
